package com.mit.common;

import java.io.Serializable;
import java.util.HashMap;

import com.mit.common.security.dto.UserDTO;

public class RequestContext implements Serializable {
	
	private UserDTO user;
	private String beanId;
	private String methodName;
	private HashMap<String, Object> parameters;
	
	public RequestContext(){
		parameters = new HashMap<String, Object> ();
	}
	
	public RequestContext(String beanId, String methodName){
		this.beanId = beanId;
		this.methodName =  methodName;
		parameters = new HashMap<String, Object> ();
	}

	
	public void setParameters(HashMap<String, Object> parameters) {
		this.parameters = parameters;
	}

	public void addParameter(String key, Object param){
		parameters.put(key, param);
	}
	
	public Object getParameter(String key){
		return parameters.get(key);
	}

	public UserDTO getUser() {
		return user;
	}

	public void setUser(UserDTO user) {
		this.user = user;
	}

	public String getBeanId() {
		return beanId;
	}

	public void setBeanId(String beanId) {
		this.beanId = beanId;
	}

	public String getMethodName() {
		return methodName;
	}

	public void setMethodName(String methodName) {
		this.methodName = methodName;
	}



}
